package top.lfyao.designpattern.details.strategy;

/**
 * 策略接口
 *      定义了算法家族。分别封装起来，让它们之间可以相互替换，此模式让算法的变化不会影响到算法的客户
 *
 */
public interface Strategy {
    public void algorithmInterface();
}

class ConcreteStrategyA implements Strategy {

    @Override
    public void algorithmInterface() {
        System.out.println("策略A的具体算法实现");
    }

}

class ConcreteStrategyB implements Strategy {

    @Override
    public void algorithmInterface() {
        System.out.println("策略B的具体算法实现");
    }

}

class ConcreteStrategyC implements Strategy {

    @Override
    public void algorithmInterface() {
        System.out.println("策略C的具体算法实现");
    }

}